#include <cassert>
#include <vector>
#include <string>
#include "core/Game.h"

static Level sampleLevel() {
    std::vector<std::string> lines = {
        "#####",
        "#.@ #",
        "# $*#",
        "#   #",
        "#####"
    };
    return Level::fromStringGrid(lines);
}

int main() {
    Level lvl = sampleLevel();
    Game game(lvl);
    assert(!game.completed());
    bool m1 = game.move(Direction::Down);
    assert(m1);
    bool m2 = game.move(Direction::Right);
    assert(m2);
    bool m3 = game.move(Direction::Right);
    assert(m3);
    assert(game.completed());
    bool u1 = game.undo();
    assert(u1);
    assert(!game.completed());
    game.reset();
    assert(!game.completed());
    return 0;
}